/* Create an AST, then invoke our interpreter. */
package Main;

import minijava.parser.*;
import minijava.lexer.*;
import minijava.node.*;

import java.io.*;

public class Main {
	public static void main(String[] args) {
		if (args.length > 0) {
			try {
				/* Form our AST */
				Lexer lexer = new Lexer(new PushbackReader(new FileReader(
						args[0]), 1024));
				Parser parser = new Parser(lexer);
				Start ast = parser.parse();
				System.out.println("Success!");
			} catch (Exception e) {
				System.out.println(e);
			}
		} else {
			System.err.println("usage: java minijava inputFile");
			System.exit(1);
		}
	}
}
